package com.software.cool.mapper;

import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.core.Queue;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.util.StringUtil;

@Component
@Slf4j
public class RabbitmqMapper {
//    @Autowired
//    private RabbitTemplate rabbitTemplate;

    public void sendWork(String routingKey,String message) throws Exception{
        try{
            if(StringUtil.isNotEmpty(message)){
//                rabbitTemplate.convertAndSend(routingKey, message);
                log.info("routingKey："+routingKey);
                log.info("data:"+message);
                log.info("success...");
            }
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
